#pragma once

static inline void put_user_long(unsigned long val, int *addr) {
    __asm__("movl %0, %%fs:%1"
            : /* no outputs */
            : "ir"(val), "m"(*addr));
}

#define put_fs_long(x, addr) put_user_long((x), (int *)(addr))
